export default {
  totalCount(state) {
    return state.todos.length
  },
  completedCount(state) {
    return state.todos.reduce((preTotal, e) => preTotal + (e.completed ? 1 : 0), 0)
  },
  isAllCheck(state, getters) {
    return getters.totalCount === getters.completedCount && getters.totalCount > 0
  }
}
